<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="format-detection" content="telephone=no">
        <link rel="stylesheet" href="/woniu/Public/X-admin/css/x-admin.css" media="all">
</head>
<body>
        <div class="x-body">
            <form class="layui-form layui-form-pane">
            <input type="hidden" name="id" id="sid" value="<?php echo ($list['id']); ?>">
                <div class="layui-form-item">
                    <label for="L_title" class="layui-form-label">
                        发送人
                    </label>
                    <div class="layui-input-block">
                        <input type="text" id="L_title" name="sender" required lay-verify="title" autocomplete="off" class="layui-input" value="<?php echo ($list['sender']); ?>">
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    
                    <label for="L_content" class="layui-form-label" style="top: -2px;">
                        详细描述
                    </label>
                    <div style="width:94%;min-height: 200px;border:3px solid #e6e6e6;border-radius: 2px;border-top:0px;padding: 20px;">
                        <?php echo ($list['contents']); ?>
                    </div>
                </div>
            </form>
        </div>

  </body>
  </html>
   <script src="/woniu/Public/X-admin/lib/layui/layui.js" charset="utf-8"></script>
   <script src="/woniu/Public/X-admin/js/x-layui.js" charset="utf-8"></script>
   <script>
      layui.use(['form','layer'], function(){
                $ = layui.jquery;
              var form = layui.form();
              layer = layui.layer;


      layui.use('layedit', function(){
        var layedit = layui.layedit;
        layedit.build('demo', {
          tool: []
        }); 
      });


       //监听提交
        form.on('submit(formDemo)', function(data){
          // console.log(data);
          id = $("#sid").val();
           $.ajax({
               type: "post",
               url: "/woniu/index.php/Home/AffairStu/update",
               data:{id:id},
               dataType: "json",
               success: 
                  function (data) {
                 if(!data=='1'){
                    return false;
                 }
               }
           });
           layer.alert("查看成功",{icon:6},function(){
              var index = parent.layer.getFrameIndex(window.name);
              parent.layer.close(index);
              parent.reload();

           });
          return false;
         });

           form.on('submit(close)', function(data){
              var index = parent.layer.getFrameIndex(window.name);
              parent.layer.close(index);
              parent.reload();
           });

        });
    </script>